package cn.iocoder.yudao.module.dlbz.dal.mysql.companyscoresendrecord;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.dlbz.dal.dataobject.companyscoresendrecord.CompanyScoreSendRecordDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.dlbz.controller.admin.companyscoresendrecord.vo.*;

/**
 * 企业积分发放记录 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CompanyScoreSendRecordMapper extends BaseMapperX<CompanyScoreSendRecordDO> {

    default PageResult<CompanyScoreSendRecordDO> selectPage(CompanyScoreSendRecordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CompanyScoreSendRecordDO>()
                .eqIfPresent(CompanyScoreSendRecordDO::getCompanyId, reqVO.getCompanyId())
                .eqIfPresent(CompanyScoreSendRecordDO::getEmployeeId, reqVO.getEmployeeId())
                .likeIfPresent(CompanyScoreSendRecordDO::getEmployeeName, reqVO.getEmployeeName())
                .eqIfPresent(CompanyScoreSendRecordDO::getPostId, reqVO.getPostId())
                .likeIfPresent(CompanyScoreSendRecordDO::getPostName, reqVO.getPostName())
                .eqIfPresent(CompanyScoreSendRecordDO::getScore, reqVO.getScore())
                .eqIfPresent(CompanyScoreSendRecordDO::getRuleId, reqVO.getRuleId())
                .likeIfPresent(CompanyScoreSendRecordDO::getRuleName, reqVO.getRuleName())
                .betweenIfPresent(CompanyScoreSendRecordDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CompanyScoreSendRecordDO::getId));
    }

}